package thread.threaddemo;


import java.time.LocalDateTime;
import java.util.concurrent.locks.LockSupport;

/**
 * @Author: wenjingyuan
 * @Date: 2023/02/11/22:30
 * @Description:LockSupport.parkUntil()
 */
public class LockSupport2 {
    public static void main(String[] args) throws InterruptedException {
        Thread t1=new Thread(()->{
            System.out.println("线程1开始执行 |"+ LocalDateTime.now());
           // LockSupport.parkUntil(System.currentTimeMillis()+1000);
            LockSupport.park();
            System.out.println("线程1结束执行|"+ LocalDateTime.now());
        },"线程1");
        t1.start();
    }
}